import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class PageWrap extends StatelessWidget {
  final title;

  final children;

  const PageWrap({
    super.key,
    this.children,
    this.title,
  });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(
            title, // 设置标题文本
            style: TextStyle(
              color: Colors.white, // 设置标题字体颜色
            ),
          ),
          iconTheme: IconThemeData(
            color: Colors.white, // 设置返回图标颜色
          ),
          backgroundColor: Colors.deepPurple, // 设置AppBar背景颜色
        ),
        body: SingleChildScrollView(
          padding: const EdgeInsets.all(20.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
              children: children
          ),
        ));
    ;
  }
}
